package com.jintian.smart.kernel.switching.api;

import com.jintian.smart.kernel.switching.entity.ETLExtractJob;
import org.springframework.core.io.Resource;

public interface IExtractTask<Rule> {
    public static final String TRANSFER_DMP_FILE_EXT = ".dmp";
    public static final String TRANSFER_DZP_FILE_EXT = ".dzp";

    /**
     * 采集规则
     *
     * @param resource
     * @return
     */
    Rule loadRule(Resource resource);

    /**
     * 数据类型
     *
     * @return
     */
    Class<?> getDataType();

    /**
     * 执行
     */
    void execute();

    boolean execute(ETLExtractJob job);
}
